package com.roger.springcloudGreenwich.springsecurity.controller;

import com.roger.springcloudGreenwich.springsecurity.domain.Users;
import com.roger.springcloudGreenwich.springsecurity.mapper.UsersMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by yulei on 2022/10/15.
 */
@RestController
@RequestMapping("/users")
public class UsersController {
    @Autowired
    private UsersMapper usersMapper;

    @RequestMapping(value = "/findById/{id}",method = RequestMethod.GET)
    public Users findById(@PathVariable Long id){
        return usersMapper.selectById(id);
    }
}
